<?php
$id=$_GET['id'];
$con = mysqli_connect('localhost', 'root', 'root');
if (!$con) {
    die('连接失败' . mysqli_connect_error());
}
mysqli_select_db($con, 'blog');
mysqli_set_charset($con, 'utf8');
$sql="delete from blog where id=$id";
$result = mysqli_query($con, $sql);
if (!$result){
    echo '删除失败'.mysqli_error($con);
}else{
    header("Location:blog_list.php");
}